import * as api from '@/api/dashboard'

const state = {
  lineData: [],
}

const mutations = {
  SET_LINE_DATA (state, newValue) {
    state.lineData = newValue
  },
}

const actions = {
  async updateLineData ({ commit }) {
    const res = await api.getLineData()
    console.log(res);
    commit('SET_LINE_DATA', res)
  },
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
